<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=utf-8" />
<title>Class: Thinner::Configuration</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo; 
    <span class='title'><span class='object_link'><a href="../Thinner.html" title="Thinner (module)">Thinner</a></span></span>
     &raquo; 
    <span class="title">Configuration</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Thinner::Configuration
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Thinner::Configuration</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/thinner/configuration.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
Thinner::Configuration holds the various settings for Thinner
</p>


  </div>
</div>
<div class="tags">
  
</div>

  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#batch_length-instance_method" title="#batch_length (instance method)">- (Object) <strong>batch_length</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Returns the value of attribute batch_length.
</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#log_file-instance_method" title="#log_file (instance method)">- (Object) <strong>log_file</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Returns the value of attribute log_file.
</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#no_kill-instance_method" title="#no_kill (instance method)">- (Object) <strong>no_kill</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Returns the value of attribute no_kill.
</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#server-instance_method" title="#server (instance method)">- (Object) <strong>server</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Returns the value of attribute server.
</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#sleep_time-instance_method" title="#sleep_time (instance method)">- (Object) <strong>sleep_time</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Returns the value of attribute sleep_time.
</p>
</div></span>
  
</li>

    
  </ul>


  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Configuration) <strong>initialize</strong> </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Create a Thinner::Configuration instance with sane defaults.
</p>
</div></span>
  
</li>

      
    </ul>
  

<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="Thinner::Configuration (class)">Configuration</a></span></tt>) <strong>initialize</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Create a Thinner::Configuration instance with sane defaults.
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 9</span>

<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span>
  <span class='comment val'># Number of urls to purge at one time. These purge requests are fired in quick</span>
  <span class='comment val'># succession. Thinner is perfectly capable of killing a Varnish server, by</span>
  <span class='comment val'># overloading the worker thread, so be really conservative with this option.</span>
  <span class='@batch_length ivar id'>@batch_length</span> <span class='assign token'>=</span> <span class='integer val'>10</span>

  <span class='comment val'># The amount of time to sleep between purges in seconds.</span>
  <span class='@sleep_time ivar id'>@sleep_time</span>   <span class='assign token'>=</span> <span class='integer val'>1</span>

  <span class='comment val'># The server address and management port. See:</span>
  <span class='comment val'>#   http://www.varnish-cache.org/trac/wiki/ManagementPort</span>
  <span class='comment val'># for details.</span>
  <span class='@server ivar id'>@server</span>       <span class='assign token'>=</span> <span class='string val'>&quot;127.0.0.1:6082&quot;</span>

  <span class='comment val'># By default, every time you call Thinner.purge! thinner spins off a new</span>
  <span class='comment val'># instance of Thinner::Client and terminates any old instances that are</span>
  <span class='comment val'># running. If you want to have overlapping instances set this to true.</span>
  <span class='comment val'># It's not recommended to have multiple Thinner::Client's running at the</span>
  <span class='comment val'># same time.</span>
  <span class='@no_kill ivar id'>@no_kill</span>      <span class='assign token'>=</span> <span class='false false kw'>false</span>

  <span class='comment val'># The log file (either a string or file object) to log the current batch to.</span>
  <span class='comment val'># Defaults to STDOUT</span>
  <span class='@log_file ivar id'>@log_file</span>     <span class='assign token'>=</span> <span class='STDOUT constant id'>STDOUT</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="batch_length=-instance_method"></span>
      <span id="batch_length-instance_method"></span>
      <div class="method_details first">
  <p class="signature first" id="batch_length-instance_method">
  
    - (<tt>Object</tt>) <strong>batch_length</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute batch_length
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>

<span class='def def kw'>def</span> <span class='batch_length identifier id'>batch_length</span>
  <span class='@batch_length ivar id'>@batch_length</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="log_file=-instance_method"></span>
      <span id="log_file-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="log_file-instance_method">
  
    - (<tt>Object</tt>) <strong>log_file</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute log_file
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>

<span class='def def kw'>def</span> <span class='log_file identifier id'>log_file</span>
  <span class='@log_file ivar id'>@log_file</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="no_kill=-instance_method"></span>
      <span id="no_kill-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="no_kill-instance_method">
  
    - (<tt>Object</tt>) <strong>no_kill</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute no_kill
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>

<span class='def def kw'>def</span> <span class='no_kill identifier id'>no_kill</span>
  <span class='@no_kill ivar id'>@no_kill</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="server=-instance_method"></span>
      <span id="server-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="server-instance_method">
  
    - (<tt>Object</tt>) <strong>server</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute server
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>

<span class='def def kw'>def</span> <span class='server identifier id'>server</span>
  <span class='@server ivar id'>@server</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="sleep_time=-instance_method"></span>
      <span id="sleep_time-instance_method"></span>
      <div class="method_details ">
  <p class="signature " id="sleep_time-instance_method">
  
    - (<tt>Object</tt>) <strong>sleep_time</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Returns the value of attribute sleep_time
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


6
7
8</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/thinner/configuration.rb', line 6</span>

<span class='def def kw'>def</span> <span class='sleep_time identifier id'>sleep_time</span>
  <span class='@sleep_time ivar id'>@sleep_time</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


</div>
    
    <div id="footer">
  Generated on Mon Nov 22 12:10:39 2010 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.6.1 (ruby-1.8.7).
</div>

  </body>
</html>